第3步:让我们创建一个函数来计算霸王龙和小猫在月球上的重量!
浮点数是一个带小数点的数字。它是 Python 中使用的数据类型,就像整数或字符串。
- 点击 并拖出 Define Function with Parameters 。
- 将函数的名称更改为 get_moon_weight。
- 点击 ,将 Float Variable 拖动到函数内部。在它前面应当有一个 ···· 。
To navigate the page using the TAB key, first press ESC to exit the code editor.